<%--
  User: aleksey
  Date: Sep 22, 2009
  Time: 7:30:52 PM
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<html>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<f:view locale="#{localeManager.locale}">
    <f:loadBundle var="msgs" basename="messages"/>
    <head>
        <title><h:outputText value="#{msgs['title']}"/></title>
        <link href="olga.css" rel="stylesheet" type="text/css">
    </head>
    <body>
        <h:form id="list_of_contests">
            <%@include file="logoPanel.jspf"%>
            <%@include file="navigationPanel.jspf"%>

            <h:dataTable id="conteststable" value="#{contest.contests}" var="item" styleClass="simpleTable">
                <h:column headerClass="columnHeader">
                    <f:facet name="header"><h:outputText value="ID"/></f:facet>
                    <h:outputText value="#{item.id}"/>
                </h:column>
                <h:column headerClass="columnHeader">
                    <f:facet name="header"><h:outputText value="Name:"/></f:facet>
                    <h:commandLink action="#{contest.viewContest}" value="#{item.name}">
                        <f:param name="contest" value="#{item.id}"/>
                    </h:commandLink>
                </h:column>
                <h:column headerClass="columnHeader">
                    <f:facet name="header"><h:outputText value=""/></f:facet>
                    <h:commandLink action="#{contest.editContest}" value="Edit">
                        <f:param name="contest" value="#{item.id}"/>
                    </h:commandLink>
                </h:column>
            </h:dataTable>
            <h:commandLink action="#{contest.createContest}" value="Create new contest"/>
        </h:form>
    </body>
</f:view>
</html>
